package Score;
    public class Student extends Person {
        private String no;
        private double scoreEn;
        private double scoreMath;
        private double scoreCh;
        public Student(String name, String sex, int age, String no, double scoreEn, double scoreMath, double scoreCh) {
            super(name, sex, age);
            this.no = no; this.scoreEn = scoreEn;
            this.scoreMath = scoreMath; this.scoreCh = scoreCh;
        }
        public double average() {
            return (scoreEn + scoreMath + scoreCh) / 3;
        }
        public double max() {
            return Math.max(scoreEn, Math.max(scoreMath, scoreCh));
        }
        public double min() {
            return Math.min(scoreEn, Math.min(scoreMath, scoreCh));
        }
        @Override public String toString() {
            return super.toString() + ", No: " + no + ", Average: " + average() + ", Max: " + max() + ", Min: " + min();
        }
    }

